package net.huashitong.synthetical.showView.web;

import com.sirdc.modules.core.web.JsonBaseController;
import com.sirdc.modules.core.web.model.Message;
import net.huashitong.synthetical.showView.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;


@Controller
@RequestMapping("/indexCtrl")
public class IndexCtrl extends JsonBaseController {
    @Override
    protected String getView(String s) {
        return null;
    }

    @Autowired
    private IndexService indexService;

    /**
     * 统计首页各系统模块的实时数据
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "/showDataCount",method = RequestMethod.POST)
    public Message showDataCount(){
        Map<String, Integer> result = new HashMap<>();
        //重大节点项目数据
        int zdCount = indexService.queryZhongDaDataCount();
        //招商引资项目数据
        //绩效考核数据
        //经济数据

        return coverMessage("200", "成功", result);
    }
}
